class Client < ActiveRecord::Base
  
  has_many :reservations
  has_many :chambres, :through => :reservations
  
  def self.search(search)
    find(:all, :conditions => ["nom LIKE ?", "%#{search}%"], :order => "nom")
  end
  
  validates_presence_of :nom, :prenom
  
  
end
